package com.phf.vhr.mapper;

import com.phf.vhr.model.entity.RolesDO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 角色表 Mapper 接口
 * </p>
 *
 * @author phf
 * @since 2021-09-26
 */
@Mapper
public interface RolesMapper extends BaseMapper<RolesDO> {

    /**
     * 通过用户id获取角色
     * 
     * @param userId
     * @return
     */
    @Select("select * from roles where id = #{userId}")
    List<RolesDO> getRolesListDataByUserId(Long userId);

}
